<script setup lang='ts'>
import { onMounted, ref } from 'vue';


// 模板引用注解
const inputRef = ref<HTMLInputElement|null>(null)
onMounted(()=>{
  inputRef.value?.focus()
})

const aRef = ref<HTMLAnchorElement|null>(null)
onMounted(()=>{
  aRef.value?.href
})

</script>
<template>
<div>
  <input ref="inputRef" type="text">
  <a ref="aRef" href="555"></a>
</div>
</template>
<style scoped>
</style>